﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using POSSystem.DAL;

namespace POSSystem.BLL
{
    public class View_InvoiceDetails : _View_InvoiceDetails
    {
        public static View_InvoiceDetails GetDetailsByInvoiceID(int invoiceID)
        {
            try
            {
                View_InvoiceDetails details = new View_InvoiceDetails();
                details.Where.InvoiceID.Value = invoiceID;
                details.Query.Load();

                return details;
            }
            catch (Exception ex)
            {
                ErrorLog.WriteToFile("View_InvoiceDetails.cs","GetDetailsByInvoiceID", ex.StackTrace );
                throw ex;
            }
        }
    }
}
